<!DOCTYPE html>

<html ng-app="GMExpectedResultsLoader">

<head>
  <title>View GM Expected Results for One Platform</title>
  <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.1.5/angular.min.js"></script>
  <script src="loader.js"></script>
</head>

<body>
  <div ng-controller="GMExpectedResultsLoader.Controller" >

    Pick a platform...
    <select ng-model="platformPath" ng-change="changePlatformPath()">

<!-- Generated the option lines as follows:
$ cd expectations/gm
$ ALL=$(ls -d Test*)
$ for ONE in $ALL; do echo "      <option value=\"$ONE\">$ONE</option>"; done

TODO(epoger): Once https://code.google.com/p/skia/issues/detail?id=1544
('live query of builder list makes rebaseline.py slow to start up') has been
resolved, we should use similar techniques to populate this list automatically.
-->

      <option value="Test-Android-GalaxyNexus-SGX540-Arm7-Debug">Test-Android-GalaxyNexus-SGX540-Arm7-Debug</option>
      <option value="Test-Android-GalaxyNexus-SGX540-Arm7-Debug-Trybot">Test-Android-GalaxyNexus-SGX540-Arm7-Debug-Trybot</option>
      <option value="Test-Android-GalaxyNexus-SGX540-Arm7-Release">Test-Android-GalaxyNexus-SGX540-Arm7-Release</option>
      <option value="Test-Android-GalaxyNexus-SGX540-Arm7-Release-Trybot">Test-Android-GalaxyNexus-SGX540-Arm7-Release-Trybot</option>
      <option value="Test-Android-IntelRhb-SGX544-x86-Debug">Test-Android-IntelRhb-SGX544-x86-Debug</option>
      <option value="Test-Android-IntelRhb-SGX544-x86-Debug-Trybot">Test-Android-IntelRhb-SGX544-x86-Debug-Trybot</option>
      <option value="Test-Android-IntelRhb-SGX544-x86-Release">Test-Android-IntelRhb-SGX544-x86-Release</option>
      <option value="Test-Android-Nexus10-MaliT604-Arm7-Debug">Test-Android-Nexus10-MaliT604-Arm7-Debug</option>
      <option value="Test-Android-Nexus10-MaliT604-Arm7-Release">Test-Android-Nexus10-MaliT604-Arm7-Release</option>
      <option value="Test-Android-Nexus4-Adreno320-Arm7-Debug">Test-Android-Nexus4-Adreno320-Arm7-Debug</option>
      <option value="Test-Android-Nexus4-Adreno320-Arm7-Debug-Trybot">Test-Android-Nexus4-Adreno320-Arm7-Debug-Trybot</option>
      <option value="Test-Android-Nexus4-Adreno320-Arm7-Release">Test-Android-Nexus4-Adreno320-Arm7-Release</option>
      <option value="Test-Android-Nexus4-Adreno320-Arm7-Release-Trybot">Test-Android-Nexus4-Adreno320-Arm7-Release-Trybot</option>
      <option value="Test-Android-Nexus7-Tegra3-Arm7-Debug">Test-Android-Nexus7-Tegra3-Arm7-Debug</option>
      <option value="Test-Android-Nexus7-Tegra3-Arm7-Debug-Trybot">Test-Android-Nexus7-Tegra3-Arm7-Debug-Trybot</option>
      <option value="Test-Android-Nexus7-Tegra3-Arm7-Release">Test-Android-Nexus7-Tegra3-Arm7-Release</option>
      <option value="Test-Android-NexusS-SGX540-Arm7-Debug">Test-Android-NexusS-SGX540-Arm7-Debug</option>
      <option value="Test-Android-NexusS-SGX540-Arm7-Debug-Trybot">Test-Android-NexusS-SGX540-Arm7-Debug-Trybot</option>
      <option value="Test-Android-NexusS-SGX540-Arm7-Release">Test-Android-NexusS-SGX540-Arm7-Release</option>
      <option value="Test-Android-RazrI-SGX540-x86-Debug">Test-Android-RazrI-SGX540-x86-Debug</option>
      <option value="Test-Android-RazrI-SGX540-x86-Release">Test-Android-RazrI-SGX540-x86-Release</option>
      <option value="Test-Android-Xoom-Tegra2-Arm7-Debug">Test-Android-Xoom-Tegra2-Arm7-Debug</option>
      <option value="Test-Android-Xoom-Tegra2-Arm7-Release">Test-Android-Xoom-Tegra2-Arm7-Release</option>
      <option value="Test-ChromeOS-Alex-GMA3150-x86-Debug">Test-ChromeOS-Alex-GMA3150-x86-Debug</option>
      <option value="Test-ChromeOS-Alex-GMA3150-x86-Debug-Trybot">Test-ChromeOS-Alex-GMA3150-x86-Debug-Trybot</option>
      <option value="Test-ChromeOS-Alex-GMA3150-x86-Release">Test-ChromeOS-Alex-GMA3150-x86-Release</option>
      <option value="Test-ChromeOS-Alex-GMA3150-x86-Release-Trybot">Test-ChromeOS-Alex-GMA3150-x86-Release-Trybot</option>
      <option value="Test-ChromeOS-Daisy-MaliT604-Arm7-Debug">Test-ChromeOS-Daisy-MaliT604-Arm7-Debug</option>
      <option value="Test-ChromeOS-Daisy-MaliT604-Arm7-Debug-Trybot">Test-ChromeOS-Daisy-MaliT604-Arm7-Debug-Trybot</option>
      <option value="Test-ChromeOS-Daisy-MaliT604-Arm7-Release">Test-ChromeOS-Daisy-MaliT604-Arm7-Release</option>
      <option value="Test-ChromeOS-Daisy-MaliT604-Arm7-Release-Trybot">Test-ChromeOS-Daisy-MaliT604-Arm7-Release-Trybot</option>
      <option value="Test-ChromeOS-Link-HD4000-x86_64-Debug">Test-ChromeOS-Link-HD4000-x86_64-Debug</option>
      <option value="Test-ChromeOS-Link-HD4000-x86_64-Debug-Trybot">Test-ChromeOS-Link-HD4000-x86_64-Debug-Trybot</option>
      <option value="Test-ChromeOS-Link-HD4000-x86_64-Release">Test-ChromeOS-Link-HD4000-x86_64-Release</option>
      <option value="Test-ChromeOS-Link-HD4000-x86_64-Release-Trybot">Test-ChromeOS-Link-HD4000-x86_64-Release-Trybot</option>
      <option value="Test-Mac10.6-MacMini4.1-GeForce320M-x86_64-Debug">Test-Mac10.6-MacMini4.1-GeForce320M-x86_64-Debug</option>
      <option value="Test-Mac10.6-MacMini4.1-GeForce320M-x86_64-Debug-Trybot">Test-Mac10.6-MacMini4.1-GeForce320M-x86_64-Debug-Trybot</option>
      <option value="Test-Mac10.6-MacMini4.1-GeForce320M-x86_64-Release">Test-Mac10.6-MacMini4.1-GeForce320M-x86_64-Release</option>
      <option value="Test-Mac10.6-MacMini4.1-GeForce320M-x86_64-Release-Trybot">Test-Mac10.6-MacMini4.1-GeForce320M-x86_64-Release-Trybot</option>
      <option value="Test-Mac10.6-MacMini4.1-GeForce320M-x86-Debug">Test-Mac10.6-MacMini4.1-GeForce320M-x86-Debug</option>
      <option value="Test-Mac10.6-MacMini4.1-GeForce320M-x86-Debug-Trybot">Test-Mac10.6-MacMini4.1-GeForce320M-x86-Debug-Trybot</option>
      <option value="Test-Mac10.6-MacMini4.1-GeForce320M-x86-Release">Test-Mac10.6-MacMini4.1-GeForce320M-x86-Release</option>
      <option value="Test-Mac10.6-MacMini4.1-GeForce320M-x86-Release-Trybot">Test-Mac10.6-MacMini4.1-GeForce320M-x86-Release-Trybot</option>
      <option value="Test-Mac10.7-MacMini4.1-GeForce320M-x86_64-Debug">Test-Mac10.7-MacMini4.1-GeForce320M-x86_64-Debug</option>
      <option value="Test-Mac10.7-MacMini4.1-GeForce320M-x86_64-Debug-Trybot">Test-Mac10.7-MacMini4.1-GeForce320M-x86_64-Debug-Trybot</option>
      <option value="Test-Mac10.7-MacMini4.1-GeForce320M-x86_64-Release">Test-Mac10.7-MacMini4.1-GeForce320M-x86_64-Release</option>
      <option value="Test-Mac10.7-MacMini4.1-GeForce320M-x86_64-Release-Trybot">Test-Mac10.7-MacMini4.1-GeForce320M-x86_64-Release-Trybot</option>
      <option value="Test-Mac10.7-MacMini4.1-GeForce320M-x86-Debug">Test-Mac10.7-MacMini4.1-GeForce320M-x86-Debug</option>
      <option value="Test-Mac10.7-MacMini4.1-GeForce320M-x86-Debug-Trybot">Test-Mac10.7-MacMini4.1-GeForce320M-x86-Debug-Trybot</option>
      <option value="Test-Mac10.7-MacMini4.1-GeForce320M-x86-Release">Test-Mac10.7-MacMini4.1-GeForce320M-x86-Release</option>
      <option value="Test-Mac10.7-MacMini4.1-GeForce320M-x86-Release-Trybot">Test-Mac10.7-MacMini4.1-GeForce320M-x86-Release-Trybot</option>
      <option value="Test-Mac10.8-MacMini4.1-GeForce320M-x86_64-Debug">Test-Mac10.8-MacMini4.1-GeForce320M-x86_64-Debug</option>
      <option value="Test-Mac10.8-MacMini4.1-GeForce320M-x86_64-Debug-Trybot">Test-Mac10.8-MacMini4.1-GeForce320M-x86_64-Debug-Trybot</option>
      <option value="Test-Mac10.8-MacMini4.1-GeForce320M-x86_64-Release">Test-Mac10.8-MacMini4.1-GeForce320M-x86_64-Release</option>
      <option value="Test-Mac10.8-MacMini4.1-GeForce320M-x86_64-Release-Trybot">Test-Mac10.8-MacMini4.1-GeForce320M-x86_64-Release-Trybot</option>
      <option value="Test-Mac10.8-MacMini4.1-GeForce320M-x86-Debug">Test-Mac10.8-MacMini4.1-GeForce320M-x86-Debug</option>
      <option value="Test-Mac10.8-MacMini4.1-GeForce320M-x86-Debug-Trybot">Test-Mac10.8-MacMini4.1-GeForce320M-x86-Debug-Trybot</option>
      <option value="Test-Mac10.8-MacMini4.1-GeForce320M-x86-Release">Test-Mac10.8-MacMini4.1-GeForce320M-x86-Release</option>
      <option value="Test-Mac10.8-MacMini4.1-GeForce320M-x86-Release-Trybot">Test-Mac10.8-MacMini4.1-GeForce320M-x86-Release-Trybot</option>
      <option value="Test-Ubuntu12-ShuttleA-ATI5770-x86_64-Debug">Test-Ubuntu12-ShuttleA-ATI5770-x86_64-Debug</option>
      <option value="Test-Ubuntu12-ShuttleA-ATI5770-x86_64-Debug-Trybot">Test-Ubuntu12-ShuttleA-ATI5770-x86_64-Debug-Trybot</option>
      <option value="Test-Ubuntu12-ShuttleA-ATI5770-x86_64-Release">Test-Ubuntu12-ShuttleA-ATI5770-x86_64-Release</option>
      <option value="Test-Ubuntu12-ShuttleA-ATI5770-x86_64-Release-Trybot">Test-Ubuntu12-ShuttleA-ATI5770-x86_64-Release-Trybot</option>
      <option value="Test-Ubuntu12-ShuttleA-ATI5770-x86-Debug">Test-Ubuntu12-ShuttleA-ATI5770-x86-Debug</option>
      <option value="Test-Ubuntu12-ShuttleA-ATI5770-x86-Debug-Trybot">Test-Ubuntu12-ShuttleA-ATI5770-x86-Debug-Trybot</option>
      <option value="Test-Ubuntu12-ShuttleA-ATI5770-x86-Release">Test-Ubuntu12-ShuttleA-ATI5770-x86-Release</option>
      <option value="Test-Ubuntu12-ShuttleA-ATI5770-x86-Release-Trybot">Test-Ubuntu12-ShuttleA-ATI5770-x86-Release-Trybot</option>
      <option value="Test-Ubuntu12-ShuttleA-HD2000-x86_64-Release-Valgrind">Test-Ubuntu12-ShuttleA-HD2000-x86_64-Release-Valgrind</option>
      <option value="Test-Ubuntu12-ShuttleA-HD2000-x86_64-Release-Valgrind-Trybot">Test-Ubuntu12-ShuttleA-HD2000-x86_64-Release-Valgrind-Trybot</option>
      <option value="Test-Ubuntu12-ShuttleA-NoGPU-x86_64-Debug">Test-Ubuntu12-ShuttleA-NoGPU-x86_64-Debug</option>
      <option value="Test-Ubuntu12-ShuttleA-NoGPU-x86_64-Debug-Trybot">Test-Ubuntu12-ShuttleA-NoGPU-x86_64-Debug-Trybot</option>
      <option value="Test-Ubuntu13-ShuttleA-HD2000-x86_64-Debug-ASAN">Test-Ubuntu13-ShuttleA-HD2000-x86_64-Debug-ASAN</option>
      <option value="Test-Ubuntu13-ShuttleA-HD2000-x86_64-Debug-ASAN-Trybot">Test-Ubuntu13-ShuttleA-HD2000-x86_64-Debug-ASAN-Trybot</option>
      <option value="Test-Win7-ShuttleA-HD2000-x86_64-Debug">Test-Win7-ShuttleA-HD2000-x86_64-Debug</option>
      <option value="Test-Win7-ShuttleA-HD2000-x86_64-Debug-Trybot">Test-Win7-ShuttleA-HD2000-x86_64-Debug-Trybot</option>
      <option value="Test-Win7-ShuttleA-HD2000-x86_64-Release">Test-Win7-ShuttleA-HD2000-x86_64-Release</option>
      <option value="Test-Win7-ShuttleA-HD2000-x86_64-Release-Trybot">Test-Win7-ShuttleA-HD2000-x86_64-Release-Trybot</option>
      <option value="Test-Win7-ShuttleA-HD2000-x86-Debug">Test-Win7-ShuttleA-HD2000-x86-Debug</option>
      <option value="Test-Win7-ShuttleA-HD2000-x86-Debug-ANGLE">Test-Win7-ShuttleA-HD2000-x86-Debug-ANGLE</option>
      <option value="Test-Win7-ShuttleA-HD2000-x86-Debug-ANGLE-Trybot">Test-Win7-ShuttleA-HD2000-x86-Debug-ANGLE-Trybot</option>
      <option value="Test-Win7-ShuttleA-HD2000-x86-Debug-DirectWrite">Test-Win7-ShuttleA-HD2000-x86-Debug-DirectWrite</option>
      <option value="Test-Win7-ShuttleA-HD2000-x86-Debug-DirectWrite-Trybot">Test-Win7-ShuttleA-HD2000-x86-Debug-DirectWrite-Trybot</option>
      <option value="Test-Win7-ShuttleA-HD2000-x86-Debug-Trybot">Test-Win7-ShuttleA-HD2000-x86-Debug-Trybot</option>
      <option value="Test-Win7-ShuttleA-HD2000-x86-Release">Test-Win7-ShuttleA-HD2000-x86-Release</option>
      <option value="Test-Win7-ShuttleA-HD2000-x86-Release-ANGLE">Test-Win7-ShuttleA-HD2000-x86-Release-ANGLE</option>
      <option value="Test-Win7-ShuttleA-HD2000-x86-Release-ANGLE-Trybot">Test-Win7-ShuttleA-HD2000-x86-Release-ANGLE-Trybot</option>
      <option value="Test-Win7-ShuttleA-HD2000-x86-Release-DirectWrite">Test-Win7-ShuttleA-HD2000-x86-Release-DirectWrite</option>
      <option value="Test-Win7-ShuttleA-HD2000-x86-Release-DirectWrite-Trybot">Test-Win7-ShuttleA-HD2000-x86-Release-DirectWrite-Trybot</option>
      <option value="Test-Win7-ShuttleA-HD2000-x86-Release-Trybot">Test-Win7-ShuttleA-HD2000-x86-Release-Trybot</option>

    </select>

    <p>
      Expected GM results for platform {{platformPath}}:

      <table border="1">
        <tr>
          <th>Test/Config</th>
          <th>Allowed Images</th>
          <th>Bugs</th>
          <th>Reviewed By Human?</th>
        </tr>
        <tr ng-repeat="result in gmExpectedResults">
          <td>{{result.test}}_{{result.config}}</td>
          <td><span ng-repeat="image in result.allowedImages">
              <a target="_blank"
                 href="http://chromium-skia-gm.commondatastorage.googleapis.com/gm/{{image.hashType}}/{{result.test}}/{{image.hashValue}}.png">
                {{image.hashValue}}</a><br>
          </span></td>
          <td><span ng-repeat="bug in result.bugs">
            <a href="https://code.google.com/p/skia/issues/detail?id={{bug}}">{{bug}} </a>
          </span></td>
          <td>{{result.reviewedByHuman}}</td>
        </tr>
      </table>
  </div>

  <!-- TODO(epoger): Can we get the base URLs (commondatastorage and
       issues list) from
       https://skia.googlesource.com/buildbot/+/master/site_config/global_variables.json ?
       I tried importing the
       http://skia.googlecode.com/svn/buildbot/skia_tools.js script and using
       that to do so, but I got Access-Control-Allow-Origin errors.
    -->

</body>
</html>
